<?php

namespace app\http\Controllers\Manage;

use think\App;
use think\Request;

class IndexController extends BaseController
{

    public function __construct(App $app, Request $request)
    {
        parent::__construct($app, $request);
    }


    /**
     * 首页
     * @param Request $request
     * @return string
     */
    public function index(Request $request)
    {
        $param = $request->param();
        $data = [
            'menue' => json_encode(config('manage_menu')),
            'admin' => $this->accountInfo,
            'slectMenueId' => $param['menue_id'] ?? 0
        ];
        return $this->view('index', $data);
    }


    /**
     * 欢迎页
     * User:端木凌风
     * Date:2023-01-01 20:10
     * @param Request $request
     * @return string
     */
    public function main(Request $request)
    {
        $data = [];
        return $this->view('welcome', $data, self::TEMPLATE_TYPE_COMMON);
//        return $this->view('main', $data);
    }

}